/**
 *------------------------------------------------------------------------------
 *  @copyright Copyright (c) 2022  <dx_65535@163.com>. 
 * 
 *  @file       : event_handler.h
 *  @author     : Xiang.D (dx_65535@163.com)
 *  @version    : 1.0
 *  @brief      : Blog: https://linuxtaoist.gitee.io
 *  @date       : 2022-06-12
 * 
 * 
 *  Change History:
 *  <Date>     | <Version> | <Author>       | <Description>
 *------------------------------------------------------------------------------
 *  2022/06/12 | 1.0.0.1   | Xiang.D        | Create file
 *------------------------------------------------------------------------------
 * 
 */

#ifndef __EVENT_HANDLER_H__
#define __EVENT_HANDLER_H__

#include "common_type.h"

typedef void (*CallbackPtr)(void *);

class CEventHandler
{
public:
    CEventHandler();

    ~CEventHandler();

    int Init();

    int Exit();

    void Run();

    int RegisterEvent(int fd, ETransChannel channel, CallbackPtr cb);

    int UnregisterEvent(int fd);
};

#endif

